﻿#include "main.h"
#include "PushObserver.h"
#include "PushTarget.h"
#include "PullObserver.h"
#include "PullTarget.h"

int main()
{
	auto pushTarget = PushTarget();
	auto pushObserver = PushObserver();
	pushTarget.AddObserver(pushObserver);

	pushTarget.SetEvent(Event(123));
	auto pushObserver1 = PushObserver();
	pushTarget.AddObserver(pushObserver1);
	pushTarget.SetEvent(Event(223));
	pushTarget.RemoveObserver(pushObserver1);
	pushTarget.SetEvent(Event(323));

	auto pullTarget = PullTarget();
	auto pullObserver = PullObserver();
	pullTarget.AddObserver(pullObserver);

	pullTarget.SetEvent(Event(456));

	return 0;
}
